package users

import (
	"context"
	"shenmawl/api/user/v1"
)

func (c *NoRBACControllerV1) UserLogin(ctx context.Context, req *v1.UserLoginReq) (res *v1.UserLoginRes, err error) {
	token, err := c.usersNoRBAC.Login(ctx, req.Username, req.Password, req.Client)
	if err != nil {
		return
	}
	return &v1.UserLoginRes{Token: token}, nil
}
